{template 'header'}
<link href="{MODULE_URL}template/css/css.css" rel="stylesheet" />
<link href="{MODULE_URL}template/css/stylesheet.css" rel="stylesheet" />
<style type="text/css">
  .notice_content {
    margin: 0px 15px;
    height: 100%;
    overflow: hidden;
    line-height: 20px;
    font-size: 14px;
    color: #363838;
}

</style>

<div class="top_menu">
    我要报名
</div>
<div class="top_menu_shadow"></div>
<div class="panel panel-info">


  <div class="panel-body">
   <form action="" method="post"  onsubmit="return checkInfo(this);">
    <div class="form-group">
      <label for="truename" class="col-sm-2 control-label">姓名:</label>
      <div class="col-sm-10">
        <input type="text" class="form-control" id="truename" name='truename' placeholder="请输入姓名">
      </div>
    </div>
    <div class="form-group">
      <label for="inlineRadio1" class="col-sm-2 control-label">性别:</label>
      <div class="col-sm-10">
        <label class="radio-inline">
          <input type="radio" name="sex" id="inlineRadio1" value="先生" checked="checked"> 先生
        </label>
        <label class="radio-inline">
          <input type="radio" name="sex" id="inlineRadio1" value="女士"> 女士
        </label>
      </div>
    </div>
    <div class="form-group">
      <label for="mobile" class="col-sm-2 control-label">电话:</label>
      <div class="col-sm-10">
        <input type="text" class="form-control" id="mobile" name='mobile' placeholder="请输入手机号码">
      </div>
    </div>
    <div class="form-group">
      <label for="mobile" class="col-sm-2 control-label">报名人数:</label>
      <div class="col-sm-10">
        <select name='num' class='form-control'>
              <?php
                for ($i=1; $i <=$item['number'] ; $i++) { 
                   echo "<option value='$i'>$i</option>";
                }

              ?>
        </select>
      </div>
    </div>
    <div class="form-group">
      <label for="" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
          <button type="submit" class="btn btn-info">立即报名</button>
           <input type="hidden" name="token" value="{$_W['token']}" />
      </div>
    </div>
    </form>
  </div>
</div>

<script type="text/javascript">
<!--
  function checkInfo(form) {
    
    var mobile = form['mobile'].value;
    if (!mobile) {
      alert('请输入您的手机号码！');
      return false;
    }
    if (mobile.search(/^([0-9]{11})?$/) == -1) {
      alert('请输入正确的手机号码！');
      return false;
    }
    
    if (!form['truename'].value) {
      alert('请输入真实的姓名。');
      return false;
    }
    if (!form['num'].value) {
      alert(' 请选择报名数量。');
      return false;
    }
  }
//-->
</script>
{template 'footer'}